package com.xqzgj.stock.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xqzgj.stock.mapper.InventoryLogMapper;
import com.xqzgj.stock.domain.InventoryLog;
import com.xqzgj.stock.service.IInventoryLogService;

/**
 * 库存变动记录Service业务层处理
 * 
 * @author zhoujiam
 * @date 2025-03-31
 */
@Service
public class InventoryLogServiceImpl implements IInventoryLogService 
{
    @Autowired
    private InventoryLogMapper inventoryLogMapper;

    /**
     * 查询库存变动记录
     * 
     * @param id 库存变动记录主键
     * @return 库存变动记录
     */
    @Override
    public InventoryLog selectInventoryLogById(Long id)
    {
        return inventoryLogMapper.selectInventoryLogById(id);
    }

    /**
     * 查询库存变动记录列表
     * 
     * @param inventoryLog 库存变动记录
     * @return 库存变动记录
     */
    @Override
    public List<InventoryLog> selectInventoryLogList(InventoryLog inventoryLog)
    {
        return inventoryLogMapper.selectInventoryLogList(inventoryLog);
    }

    /**
     * 新增库存变动记录
     * 
     * @param inventoryLog 库存变动记录
     * @return 结果
     */
    @Override
    public int insertInventoryLog(InventoryLog inventoryLog)
    {
        return inventoryLogMapper.insertInventoryLog(inventoryLog);
    }

    /**
     * 修改库存变动记录
     * 
     * @param inventoryLog 库存变动记录
     * @return 结果
     */
    @Override
    public int updateInventoryLog(InventoryLog inventoryLog)
    {
        return inventoryLogMapper.updateInventoryLog(inventoryLog);
    }

    /**
     * 批量删除库存变动记录
     * 
     * @param ids 需要删除的库存变动记录主键
     * @return 结果
     */
    @Override
    public int deleteInventoryLogByIds(Long[] ids)
    {
        return inventoryLogMapper.deleteInventoryLogByIds(ids);
    }

    /**
     * 删除库存变动记录信息
     * 
     * @param id 库存变动记录主键
     * @return 结果
     */
    @Override
    public int deleteInventoryLogById(Long id)
    {
        return inventoryLogMapper.deleteInventoryLogById(id);
    }
}
